package com.a.io;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;

public class FbnqIO {
	public static void main(String[] args) throws IOException {
	int	a=1,b=1,c=0;
	File file=new File("D://io.txt");
	FileWriter out=null;
	try {
		 out=new FileWriter(file);
		 out.write("1,1,");
		for (int i = 1; i <= 18; i++) {
			c=a+b;
			a=b;
			b=c;
			
			out.write(c+",");
			System.out.println(c);
			if ((i+2)%5==0) {
				out.write("\n");
			}
			
		}
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}finally{
		
		out.close();
	}
		
	}
	
}
